www.gusucode.com > 智睿政府网站管理系统 V2.1.0 > 智睿政府网站管理系统 V2.1.0\code\Zhirui\editor\filemanager\connectors\asp\connector.asp

    <%@ CodePage=65001 Language="VBScript"%>
<%
Option Explicit
Response.Buffer = True
%>
<%
    if trim(request.cookies("ZhiRui")("ZhiRuiAdmin"))<>"" then
    session("ZhiRuiAdmin")=request.cookies("ZhiRui")("ZhiRuiAdmin")
    session("ZhiRuiUser")=request.cookies("ZhiRui")("ZhiRuiUser")
    session("AdminPurview")=request.cookies("ZhiRui")("AdminPurview")
    End if
	If trim(session("ZhiRuiAdmin"))="" then
	Response.Write("<script language=javascript>alert('您的缓存时间已到或为空,请返回重新登录!');this.top.location.href='Admin_Login.asp';</script>")
	Response.end
	End if
	If Request.Cookies("ZhiRui")("Check")<>"ZhiRuiSystem" then
	Response.Write("<script language=javascript>alert('您的核心认证码错误,请返回重新登录!');this.top.location.href='Admin_Login.asp';</script>")
	Response.end
	End if
%>
<!--#include file="config.asp"-->
<!--#include file="util.asp"-->
<!--#include file="io.asp"-->
<!--#include file="basexml.asp"-->
<!--#include file="commands.asp"-->
<!--#include file="class_upload.asp"-->
<%

If ( ConfigIsEnabled = False ) Then
	SendError 1, "This connector is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
End If

DoResponse

Sub DoResponse()
	Dim sCommand, sResourceType, sCurrentFolder

	' Get the main request information.
	sCommand = Request.QueryString("Command")

	sResourceType = Request.QueryString("Type")
	If ( sResourceType = "" ) Then sResourceType = "File"

	sCurrentFolder = GetCurrentFolder()

	' Check if it is an allowed command
	if ( Not IsAllowedCommand( sCommand ) ) then
		SendError 1, "The """ & sCommand & """ command isn't allowed"
	end if

	' Check if it is an allowed resource type.
	if ( Not IsAllowedType( sResourceType ) ) Then
		SendError 1, "The """ & sResourceType & """ resource type isn't allowed"
	end if

	' File Upload doesn't have to Return XML, so it must be intercepted before anything.
	If ( sCommand = "FileUpload" ) Then
		FileUpload sResourceType, sCurrentFolder, sCommand
		Exit Sub
	End If

	SetXmlHeaders

	CreateXmlHeader sCommand, sResourceType, sCurrentFolder, GetUrlFromPath( sResourceType, sCurrentFolder, sCommand)

	' Execute the required command.
	Select Case sCommand
		Case "GetFolders"
			GetFolders sResourceType, sCurrentFolder
		Case "GetFoldersAndFiles"
			GetFoldersAndFiles sResourceType, sCurrentFolder
		Case "CreateFolder"
			CreateFolder sResourceType, sCurrentFolder
	End Select

	CreateXmlFooter

	Response.End
End Sub

%>